<?php
/**
 * See the enclosed file license.txt for licensing information.
 * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html
 *
 * @copyright   The XOOPS project http://www.xoops.org/
 * @license     http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL)
 * @package     installer
 * @since       2.3.0
 * @author      Haruki Setoyama  <haruki@planewave.org>
 * @author      Kazumi Ono <webmaster@myweb.ne.jp>
 * @author      Skalpa Keo <skalpa@xoops.org>
 * @author      Taiwen Jiang <phppp@users.sourceforge.net>
 * @author      Kris <kris@frxoops.org>
 * @author      DuGris (aka L. JEN) <dugris@frxoops.org>
 * @version     $Id: install_tpl.php 1512 2008-04-27 10:43:45Z phppp $
**/

if ( !defined('XOOPS_INSTALL') ) { die('XOOPS Installation wizard die'); }

include_once '../language/' . $wizard->language . '/global.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo _LANGCODE; ?>" lang="<?php echo _LANGCODE; ?>">

<html>
<head>
    <title>
        <?php echo XOOPS_VERSION . ' : ' . XOOPS_INSTALL_WIZARD; ?>
        (<?php echo ($wizard->currentPage+1) . '/' . count($wizard->pages); ?>)
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _INSTALL_CHARSET ?>" />
    <link rel="stylesheet" type="text/css" media="all" href="style.css" />
    <script type="text/javascript" src="./js/prototype-1.6.0.3.js"></script>
    <script type="text/javascript" src="./js/xo-installer.js"></script>
</head>

<body>
	<div id="xo-header">
		<div id="xo-banner" class="commercial">
			<img id="xo-main-logo" src="img/logo.png" alt="XOOPS" />
			<div id="xo-version">
				<?php
				$version = './img/' . str_replace(" ", "_", strtolower( XOOPS_VERSION ) ) . '.png' ;
				if ( file_exists( $version ) ) {
					echo '<img src="' . $version . '" alt="' . XOOPS_VERSION . '" />';
				} else {
					echo XOOPS_VERSION ;
				}
				?>
			</div>

				<div id="xo-support">
				<select id="support" onchange="javascript:window.open(this.value);">
				<option value='#'><?php echo SUPPORT; ?></option>
				<?php
				require_once './language/supports.php';
				foreach ( $supports as $lang => $support ) {
					echo "<option value='" . $support['url'] . "'";
					if ( file_exists( './language/' . $lang . '/support.png') ) {
						echo " class='option' style='background-image:url(./language/" . $lang . "/support.png); background-repeat: no-repeat;'";
					}
					echo ">" . $support['title'] . "</option>";
				}
				?>
				</select>
				</div>
		</div>
	</div>

	<div id="xo-globalnav" class="x2-nl x2-navigation"></div>

	<div id="xo-content">
		<div class="tagsoup1">
			<div class="tagsoup2">
				<div id="wizard">
					<form id='<?php echo $wizard->currentPageName; ?>' action='<?php echo $_SERVER['PHP_SELF']; ?>' method='post'>

						<div id="header">
							<div id="title-before"></div>
							<div id="title-after"></div>
							<div id="title" class="title">
								<span id="step">
									<?php echo ($wizard->currentPage+1) . '/' . count($wizard->pages); ?>
								</span>
								<span>
									<?php echo XOOPS_INSTALL_WIZARD; ?>
								</span>
							</div>
						</div>


						<ul id="pageslist" class="x2-navigation">
						<?php
						foreach ( $wizard->pages as $k => $page ) {
							$class = '';
							if ( $k == $wizard->currentPage ) {
								$class = ' class="current"';
							} elseif ( $k > $wizard->currentPage ) {
								$class = ' class="disabled"';
							}
							if ( empty( $class ) ) {
								$li = '<a href="' . $wizard->pageURI($page) . '">' . $wizard->pagesNames[$k] . '</a>';
							} else {
								$li = $wizard->pagesNames[$k];
							}
							echo "<li$class>$li</li>\n";
						}
						?>
						</ul>

						<div class="page" id="<?php echo $wizard->currentPageName; ?>">
							<?php if ( $pageHasHelp ) { ?>
								<img id="help_button" src="img/help.png" alt="help" title="<?php echo SHOW_HIDE_HELP; ?>" class="off" onclick="showHideHelp(this)" />
							<?php } ?>

							<h2><?php echo $wizard->pagesTitles[ $wizard->currentPage ] ; ?></h2>
							<?php echo $content; ?>
						</div>

						<div id="buttons">
							<?php if ( $wizard->currentPage != 0 ) { ?>
								<button type="button" onclick="history.back()">
								<?php echo BUTTON_PREVIOUS; ?>
								</button>
							<?php } ?>

							<?php if ( @$pageHasForm ) { ?>
								<button type="submit">
							<?php } else { ?>
								<button type="button" accesskey="n" onclick="location.href='<?php echo $wizard->pageURI('+1'); ?>'">
							<?php } ?>
							<?php echo BUTTON_NEXT; ?>
							</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</body>
</html>